home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6464 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: interramp.com!usenet
  2. From: Barnett@interramp.com (Barnett E. Kurtz)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: DLL and .ini-file
  5. Date: Thu, 08 Feb 1996 17:41:09 GMT
  6. Organization: EntroData, Inc.
  7. Message-ID: <4fd9p1$afg@usenet4.interramp.com>
  8. References: <3119F649.4EE0@danadata.dk>
  9. Reply-To: Barnett@interramp.com
  10. NNTP-Posting-Host: ip24.philadelphia.pa.interramp.com
  11. X-Newsreader: Forte Free Agent 1.0.82
  12.  
  13. Kristian,
  14.  
  15. It has been awhile, but as I recall you can simply use the global SDK
  16. GetModuleFileName() function to retrieve the \path\name of the
  17. executing (calling) program. If you are using the _private_  profile
  18. functions to read the client's *.ini you should be able to resolve
  19. it's location this way. Of course this assumes that the client's *.ini
  20. file follows the usual naming convention, i.e. for client.exe there
  21. should be a file named client.ini residing in the same directory as
  22. client.exe. Recall, from the Windows point of view, your dll is an
  23. integral part of the client application. For example, when your dll
  24. calls a function it makes use of the calling application's stack just
  25. as if your sever dll function had been statically linked.
  26.  
  27. Standard Speech: A better place for questions that do not relate
  28. directly to c++ 'The Language' should be posted elsewhere. In this
  29. case, comp.os.ms-windows.programmer.tools.mfc  would be more
  30. appropriate.
  31.  
  32. dantek <dantek@danadata.dk> wrote:
  33.  
  34. >Hi !
  35. >I have written a simple objectserver and placed it in a DLL. I use 
  36. >MSVC++ v 1.5. How do I associate a .ini file to the DLL. I do not use 
  37. >CWinApp from the DLL.
  38.  
  39. >Yours Sincerely 
  40. >Kristian Lippert
  41.  
  42. -
  43. barnett@interramp.com
  44. -
  45.  
  46.